<?= $this->
load->view('left-menu');?>
<div class="span9">
	<ul class="breadcrumb">
		<li>
			<a href="#">Home</a>
			<span class="divider">/</span>
		</li>
		<li class="active">
			Member Register
			<span class="divider">/</span>
		</li>
	</ul>
	<div class="page-header">
		<h2>Membership Registration</h2>
	</div>

	<?if(isset($_GET["thank"])) { ?>

<div class="alert alert-success">Thank you for Registering with us.</div>
<h4>Provisional/Temporary Membership No :
	<b><?print_r($this->session->userdata["membercode"]);?>
</b>
	</h4>
	<br>

To be confirmed later on after Confirmation from:
<br>
<ul>
<li>
BK Centre In Charge: By Email or/and submission of 'BK Centre In Charge Permission  hard copy' or/and 'Scanned Copy of the Confirmation from BK Centre In Charge -And
</li>
<li>
Deposit of Entrance Fee, Membership Fee - Annual OR Life - Or/And
</li>
<li>
After clearance of any pending Annual Membership Fee/s for year/s not paid,in case the Interested BK Registrant is already Member of the Wing/s
</li>
<li>
for each Wing with RERF-Wings-Accounts Department.

</li>
<li>
Click <a target="_blank" href="/site/data/forms/RERF-MEMBERSHIP-FORM.pdf">here</a> to download the form

</li>
</ul>


	<? }else { ?>

	<form class="well form-inline" method="post" action="member/register" id="mem_register">

		<div class="row">
			<div class="span8">

				<div class="control-group">
					<label class="control-label">Are you BK ? :</label>
					&nbsp;&nbsp;
					<label class="radio">
						<input type="radio" name="bkoption" id="bkoption1" value="1" checked="" class="bkoption">Yes</label>
					&nbsp;&nbsp;&nbsp;&nbsp;
					<label class="radio">
						<input type="radio" name="bkoption" id="bkoption2" value="0" checked="checked" class="bkoption">No</label>

				</div>
				<div class="alert alert-error">
					Only regular students of  Brahma Kumaris can become Member/s but you are welcome to participate in Wings forthcoming Events.
				</div>
			</div>
		</div>
		<div  id="frmRegister" style="display:none">
			<div class="row" >
				<div class="span4" >
					<fieldset>
						<legend>Personal Details</legend>

						<div class="control-group">

							<label class="control-label" for="input01">First Name</label>
							<div class="controls">
								<input type="text" size="50"  name="mem_firstname" id="mem_firstname"  class="input-xlarge"  ></div>

						</div>

						<div class="control-group">

							<label class="control-label" for="input01">Last Name</label>
							<div class="controls">
								<input type="text" size="50"   name="mem_lastname" id="mem_lastname"  class="input-xlarge"  ></div>

						</div>
						<div class="control-group">

							<label class="control-label" for="input01">Date of Birth</label>
							<div class="controls">
								<input type="text" size="50"  name="mem_dob"  id="mem_dob"  class="input-xlarge"  ></div>

						</div>
						<div class="control-group">

							<label class="control-label" for="input01">Address</label>
							<div class="controls">
								<textarea  name="mem_address" id="mem_address" rows="4" class="input-xlarge"  name="mem_address"></textarea>
							</div>

						</div>

						<div class="control-group">

							<label class="control-label" for="input01">City</label>
							<div class="controls">
								<input type="text" size="50"  name="mem_city"  id="mem_city"  class="input-xlarge"  ></div>

						</div>
						<div class="control-group">

							<label class="control-label" for="input01">State</label>
							<div class="controls">
								<input type="text" size="50"   name="mem_state" id="mem_state"  class="input-xlarge"  ></div>

						</div>

						<div class="control-group">

							<label class="control-label" for="mem_mobile">Mobile No</label>
							<div class="controls">
								<input type="text" size="50"  name="mem_mobile"  id="mem_mobile"  class="input-xlarge"  ></div>

						</div>

						<div class="control-group">
							<label class="control-label" for="mem_mobile">Email Id</label>
							<br/>
							<div class="input-prepend" style="white-space: nowrap">
								<span class="add-on"> <i class="icon-envelope"></i>
								</span>
								<input type="email" name="mem_email" id="mem_email" autocomplete="on"  class="span3"></div>
						</div>

						<fieldset>
							<legend>Wings Interested</legend>

							<div class="span6">

								<?php foreach ($wingsList as $item ) { ?>
								<label class="checkbox" style="width:200px;margin:0px;padding:0px;">
									<input type="checkbox" name="mem_wings[]" value="<?php echo $item->
									wing_id;?>">
									<?php echo $item->wing_name;?></label>
								<? } ?></div>

						</fieldset>
					</fieldset>
				</div>
				<div class="span4">
					<fieldset>
						<legend>Profession Details</legend>
						<div class="control-group">

							<label class="control-label" for="mem_qualifications">Qualification</label>
							<div class="controls">
								<input type="text" class="input-xlarge"   name="mem_qualifications" id="mem_qualifications"></div>

						</div>
						<div class="control-group">

							<label class="control-label" for="mem_organization">Organization</label>
							<div class="controls">
								<input type="text" class="input-xlarge"  name="mem_organization" id="mem_organization"></div>

						</div>

						<div class="control-group">

							<label class="control-label" for="mem_job_title">Job Title/Designation</label>
							<div class="controls">
								<input type="text" class="input-xlarge"  name="mem_job_title" id="mem_job_title"></div>

						</div>

					</fieldset>
					<fieldset>
						<legend>BK Student Details</legend>
						<div class="control-group">

							<label class="control-label" for="mem_qualifications">Aloukik Date of Birth</label>
							<div class="controls">
								<input type="text" class="input-xlarge"   name="mem_adob" id="mem_adob"></div>

						</div>

						<div class="control-group">

							<label class="control-label" for="mem_qualifications">Name of your BK Centre In Charge</label>
							<div class="controls">
								<input type="text" class="input-xlarge"   name="mem_centre_incharge" id="mem_centre_incharge"></div>

						</div>

						<div class="control-group">

							<label class="control-label" for="mem_qualifications">
								Current BK Centre's Full Address where you are Attending Raj Yoga Classes
							</label>
							<div class="controls">
								<textarea  name="mm_centre_address" id="mm_centre_address" rows="4" class="input-xlarge"  name="mem_address"></textarea>
							</div>

						</div>

						<div class="control-group">
							<label class="control-label" for="mem_centre_email">BK Centre's Email Id (preferably @bkivv.org):</label>
							<br/>
							<div class="input-prepend" style="white-space: nowrap">
								<span class="add-on"> <i class="icon-envelope"></i>
								</span>
								<input type="email" name="mem_centre_email" id="mem_centre_email" autocomplete="on" class="span3"></div>
						</div>

						<div class="control-group">

							<label class="control-label" for="mem_qualifications">BK Centre In Charge's Mobile No.:</label>
							<div class="controls">
								<input type="text" class="input-xlarge"   name="mem_incharge_mobile" id="mem_incharge_mobile"></div>

						</div>

						<div class="control-group">
							<label class="control-label">BK Centre Type:</label>
							<div class="controls">
								<label class="radio">
									<input type="radio" name="mem_centre_type" id="optionsRadios1" value="0" checked="">Geeta Paathshala</label>
								<label class="radio">
									<input type="radio" name="mem_centre_type" id="optionsRadios2" value="1">Centre</label>
							</div>
						</div>

					</fieldset>
					<fieldset style="display:none">
						<legend>Account Details</legend>

						<div class="control-group">

							<label class="control-label" for="input01">Username</label>
							<div class="controls">
								<input type="text" class="input-xlarge" name="mem_username"   id="mem_username"></div>

						</div>

						<div class="control-group">

							<label class="control-label" for="input01">Password</label>
							<div class="controls">
								<input type="password" class="input-xlarge"   name="mem_password" id="mem_password"></div>

						</div>

						<div class="control-group">

							<label class="control-label" for="input01">Confirm Password *</label>
							<div class="controls">
								<input type="password" class="input-xlarge"  name="cmem_password" id="cmem_password"></div>

						</div>

					</fieldset>
				</div>

			</div>
			<div class="row">
				<button type="reset" class="btn span1">Reset</button>
				<button type="submit" class="btn pull-right">Register</button>

			</div>
		</div>
	</form>

	
	<script type="text/javascript">


$("#mem_dob").attr('readonly','readonly');
$("#mem_dob").datepicker( {'dateFormat':'yy-mm-dd'} );	
$("#mem_adob").attr('readonly','readonly');
$("#mem_adob").datepicker( {'dateFormat':'yy-mm-dd'} );	

$(".bkoption").change(function(){

if(this.value==1){


$("#frmRegister").slideDown();
$(".alert").slideUp();

}else{

	$("#frmRegister").slideUp();
	$(".alert").slideDown();
}

});
$(".ui-datepicker").hide();

$(document).ready(function(){
 
 $('#mem_register').validate(
 {
  rules: {
    mem_firstname: {
      minlength: 2,
      required: true
    },
    mem_email: {
      required: true,
      email: true
    },
    mem_city: {
      required: true,
      minlength: 2,
    }
    ,
    mem_state: {
      required: true,
      minlength: 2,
    },
     mem_dob: {
      required: true
    },
     mem_adob: {
      required: true
    }
    ,
     mem_centre_incharge: {
      required: true
    }
     ,
     mm_centre_address: {
      required: true
    }
    ,
     mem_centre_email: {
      required: true
    }
    ,
     mem_incharge_mobile: {
      required: true
    }
    ,
     mem_address: {
      required: true
    },
    mem_qualifications: {
      required: true
    }
  },
  highlight: function(label) {
    $(label).closest('.control-group').addClass('error');
  },
  success: function(label) {
    label
      .text('OK!').addClass('valid')
      .closest('.control-group').addClass('success');
  }
 });
}); // end document.ready



</script>
	<? } ?>

	<style>

/* Style For Label And TextBoxes */
.frmrow { clear:left; padding:4px 0; }
.frmlabel { float:left; clear:left; width:13em; padding:1px;font-weight:normal;color:#666;margin-left:8px; }
.frmlabelFixedHeight { float:left; clear:left; width:20em; height:77px; padding:1px; }
.frmlabel,.frmLabelFixedHeight { font-size:11px;font-weight:700; }
.errorHlt{border:1px solid orange;}
.frmrow input[type=text]{}
.frmrow input[type=password]{}
.frmrow input[type=textarea]{}
.sectionhead{font-size:11px;color:#666;background:#ccc;padding:4px;margin:1px;padding-left:6px;margin:0px;margin-left:3px;}
.button_right{font-size:11px;float:right;font-weight:bold;background:#ccc;margin-right:10px;margin-top:3px;clear:both;}

label.valid {
  /*width: 24px;
  height: 24px;*/
  background: url(assets/img/valid.png) center center no-repeat;
  display: inline-block;
  text-indent: -9999px;
   padding: 0;
  margin-top:0;
}
label.error {
  font-weight: bold;
  color: red;
  padding: 0;
  margin-top:0;
  display:block;
}

.box{
/*background:#f2f2f2;*/
border:0px solid #ccc;
padding-left:20px;
padding-top:20px;
margin:5px;
}
</style>

</div>
